﻿using System;
using System.ServiceModel;

namespace OCXS.OCXSServiceLibrary.OPCXMLDA10 {

    [MessageContract(
        WrapperName = "Browse", 
        WrapperNamespace = "http://opcfoundation.org/webservices/XMLDA/1.0/", 
        IsWrapped = true)]
    public class BrowseRequest {

        [MessageBodyMember(Name = "PropertyNames", Order = 0)]
        public System.Xml.XmlQualifiedName[] PropertyNames;

        [MessageBodyMember(Name = "LocaleID", Order = 1)]
        public string LocaleID;

        [MessageBodyMember(Name = "ClientRequestHandle", Order = 2)]
        public string ClientRequestHandle;

        [MessageBodyMember(Name = "ItemPath", Order = 3)]
        public string ItemPath;

        [MessageBodyMember(Name = "ItemName", Order = 4)]
        public string ItemName;

        [MessageBodyMember(Name = "ContinuationPoint", Order = 5)]
        public string ContinuationPoint;

        [MessageBodyMember(Name = "MaxElementsReturned", Order = 6)]
        public int MaxElementsReturned;

        [MessageBodyMember(Name = "BrowseFilter", Order = 7)]
        public OCXS.OCXSServiceLibrary.OPCXMLDA10.browseFilter BrowseFilter;

        [MessageBodyMember(Name = "ElementNameFilter", Order = 8)]
        public string ElementNameFilter;

        [MessageBodyMember(Name = "VendorFilter", Order = 9)]
        public string VendorFilter;

        [MessageBodyMember(Name = "ReturnAllProperties", Order = 10)]
        public bool ReturnAllProperties;

        [MessageBodyMember(Name = "ReturnPropertyValues", Order = 11)]
        public bool ReturnPropertyValues;

        [MessageBodyMember(Name = "ReturnErrorText", Order = 12)]
        public bool ReturnErrorText;

        public BrowseRequest() {
        }

        public BrowseRequest(System.Xml.XmlQualifiedName[] PropertyNames, string LocaleID, string ClientRequestHandle, string ItemPath, string ItemName, string ContinuationPoint, int MaxElementsReturned, OCXS.OCXSServiceLibrary.OPCXMLDA10.browseFilter BrowseFilter, string ElementNameFilter, string VendorFilter, bool ReturnAllProperties, bool ReturnPropertyValues, bool ReturnErrorText) {
            this.PropertyNames = PropertyNames;
            this.LocaleID = LocaleID;
            this.ClientRequestHandle = ClientRequestHandle;
            this.ItemPath = ItemPath;
            this.ItemName = ItemName;
            this.ContinuationPoint = ContinuationPoint;
            this.MaxElementsReturned = MaxElementsReturned;
            this.BrowseFilter = BrowseFilter;
            this.ElementNameFilter = ElementNameFilter;
            this.VendorFilter = VendorFilter;
            this.ReturnAllProperties = ReturnAllProperties;
            this.ReturnPropertyValues = ReturnPropertyValues;
            this.ReturnErrorText = ReturnErrorText;
        }
    }
}
